FROM openjdk:8-jre-slim
# MAINTAINER xuxueli

ENV PARAMS=""

ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

COPY xxl-job-admin-2.3.1.jar /xxl-job/app.jar
COPY ./conf/application.properties /xxl-job/application.properties
COPY ./conf/logback.xml /xxl-job/logback.xml

# ENTRYPOINT ["sh","-c","java -jar --spring.config.location=file:/xxl-job/application.properties -Dlogging.config=file:/xxl-job/logback.xml $JAVA_OPTS /xxl-job/app.jar $PARAMS"]
ENTRYPOINT ["java", "-jar", "/xxl-job/app.jar", "--spring.config.location=file:/xxl-job/application.properties", "-Dlogging.config=file:/xxl-job/logback.xml", "$JAVA_OPTS"]